-
Notifications
You must be signed in to change notification settings - Fork 327
Playground CLI: Wire up execution modes for Blueprints v2 #2519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Playground CLI: Wire up execution modes for Blueprints v2 #2519
Conversation
I adapted the existing run-cli tests to also test using I'd also like to add more tests specific to Blueprints v2 as part of this PR. |
* Playground should not modify the mounted directory. | ||
*/ | ||
expect(await getDirectoryChecksum(tmpDir)).toBe(checksum); | ||
expect(response.text).toContain('<title>My Blog Name</title>'); | ||
}); | ||
|
||
test('should be able to follow external symlinks in primary and secondary PHP instances', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was incorrectly included within the auto-mount tests, so this is just moving it where it belongs.
Observation: Maybe we should explore HTTPS caching during unit test. |
Not all the pre-existing run-cli tests have to pass for this PR, but the remaining test failures are:
For this PR to be merged, I believe the following need to be done:
|
I did the following:
It looks like the failing |
- Fixed conflict in symlink test - preserved both HEAD and trunk functionality - Fixed conflict in auto-mount tests - merged both versions properly - Fixed TypeScript errors by changing autoMount from boolean to string - All tests now work with both Blueprint v1 and v2 versions
I've brushed up this PR, adjusted tests, and I think it's ready for merging. |
Thanks, @adamziel! |
Motivation for the change, related issues
Applying a Blueprint to an existing site is not possible with the Blueprints v2 runner as it always runs in the
create-new-site
mode, not in theapply-to-existing-site
mode. This PR exposes an explicit--mode
optionRelated to #2508
Implementation details
This PR exposes a
mode
CLI option for use with Blueprints v2.For migration convenience, this PR also rewrites a few v1 options (e.g.
--skipWordpressSetup
) into v2 options (e.g.--mode=apply-to-existing-site
). There are appropriate safeguard in place to prevent options conflicts.In the categories of bonus, controversial, and up for discussion, this PR also expands the auto-mount option to allow passing an explicit path to auto-mount. If no path is passed the option defaults the current working directory. This is a nice feature IMO, and it also makes testing the CLI feature using
npx nx unbuilt-jspi playground-cli
(since the current directory for that command is typically the project root).Testing Instructions (or ideally a Blueprint)